<?php   
namespace  Common\Model;
use  Think\Model;

/**
 * 服务器模型
 */
 
 class ServerModel  extends Model{
 	//自动验证
 	protected  $_validate=array(
	array('server_name','require','服务器名称不能为空',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('customer_id','require','必须选择客户',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('s_time','require','购买时间必须选择',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('e_time','require','到期时间必须选择',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('ip','require','ip必须填写',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	/*array('manage_account','require','账号必须填写',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('manage_pwd','require','密码必须填写',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),
	array('manage_port','require','端口必须填写',self::MUST_VALIDATE,'regex',self::MODEL_BOTH),		*/
	);
	//自动完成
	protected  $_auto=array(
	array('c_time',NOW_TIME,self::MODEL_INSERT),
	array('status',1,self::MODEL_INSERT),
	array('system','',self::MODEL_BOTH,'ignore'),
	array('remark','',self::MODEL_BOTH,'ignore'),
	array('supplier','',self::MODEL_BOTH,'ignore'),
	);
	
	
	
 }
